package com.woniuxy.qiantai;

import com.woniuxy.qiantai.entity.Booktype;
import com.woniuxy.qiantai.service.BooktypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class RedisCache {
    @Autowired
    BooktypeService booktypeService;
    @RequestMapping("getAll")
    @ResponseBody
    public  List<Booktype> getAll(){
        List<Booktype> list = booktypeService.getAll();
        return list;
    }
}
